#include <REGX52.H>
#include <INTRINS.h>
#include "Delay.h"
#include "MatrixLED.h"


unsigned char code Animation[] = { //一列一列取出来
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0x08,0x08,0x08,0xFF,0x00,0x00,0x0E,
0x15,0x15,0x15,0x08,0x00,0x00,0xFF,0x01,
0x01,0x01,0x00,0x00,0xFF,0x01,0x01,0x01,
0x00,0x00,0x0E,0x11,0x11,0x0E,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
void main()
{
	  unsigned char i,offset=0,Count=0;
	  MatrixLED_Init();
	  while(1)
		{
				for(i=0;i<8;i++)
			  {	
						MatrixLED_showColumn(i,Animation[i+offset]); 
				}
				Count++;
				if(Count>20)//count可以控制速度
				{
				  Count=0;
		      offset++;
          if(offset>40)
          {
					   offset=0;
					}						
 				}
		}

}